package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpFaUserSaysayCommentDTO;
import com.financing.wap.dao.IFpFaUserSaysayCommentDao;
import com.financing.wap.common.SqlName;
/**
 * fp_fa_user_saysay_comment  
 * 说说评论表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpFaUserSaysayCommentDao")
public class FpFaUserSaysayCommentDaoImpl extends BaseDaoImpl<FpFaUserSaysayCommentDTO, java.lang.Integer> implements IFpFaUserSaysayCommentDao {


	@Override
	public int insert(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpFaUserSaysayCommentSql.insert, fpFaUserSaysayComment);
	}

	@Override
	public void update(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpFaUserSaysayCommentSql.update, fpFaUserSaysayComment);
	}

	@Override
	public void updateForce(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpFaUserSaysayCommentSql.updateForce, fpFaUserSaysayComment);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpFaUserSaysayCommentSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpFaUserSaysayCommentDTO> queryList(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpFaUserSaysayCommentSql.queryList, fpFaUserSaysayComment);
	}

	@Override
	public int queryListCount(FpFaUserSaysayCommentDTO fpFaUserSaysayComment) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpFaUserSaysayCommentSql.queryListCount, fpFaUserSaysayComment);
	}

	@Override
	public FpFaUserSaysayCommentDTO loadById(Integer id) throws SQLException {
		return  (FpFaUserSaysayCommentDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpFaUserSaysayCommentSql.loadById,id);
	}

	@Override
	public Class<FpFaUserSaysayCommentDTO> getEntityClass() {
		return FpFaUserSaysayCommentDTO.class;
	}
 	
}
